
<div class="row">
<?
	if(isset($system_message))echo $system_message;
	echo validation_errors() !==''?'<div class="error">'.validation_errors().'</div>' : NULL;
?>
<label class="label">Transactions</label>
<hr class="clearfix">
<ul class="nav nav-tabs">
  <li><a href="#" class="current">Unreturned</a></li>
  <li><a href="<?=site_url('custodian/transaction');?>">Returned</a></li>
</ul>

<?if(!empty($transactions)):?>
<table class="data-table">
	<thead class="tabular-head">
		<tr>
			<th>Description of Transaction</th>
			<th>Borrower</th>
			<th>Date of Transaction</th>
			<th></th>
		</tr>
	</thead>
	<tbody class="tabular">
		<?foreach($transactions as $t):?>
			<tr>
				<td><?=$t->description;?></td>
				<td><?=$t->fullname;?></td>
				<td><?=$t->date;?></td>
				<td>
					<a href="<?=site_url('custodian/view_transaction/'.__link(intval($t->transaction_id)));?>" class="btn btn-mini">View Details</a>
					<a href="<?=site_url('custodian/delete_transaction/'.__link(intval($t->transaction_id)));?>" class="confirm btn btn-danger btn-mini" title="delete Transaction?">X</a>
				</td>
			</tr>
		<?endforeach;?>
			<tr>
				<td colspan="4"><a href="<?=site_url('custodian/new_transactions');?>" class="btn btn-success">+ New Transaction</a></td>
			</tr>
	</tbody>
</table>
<?else:?>
<div class="alert">
	No Transactions to show. <a href="<?=site_url('custodian/new_transactions');?>" class="btn btn-mini">Add transactions</a>
</div>
<?endif;?>
</div>